<template>
	<view>
		<input v-if="type" style="height: 80rpx; line-height: 80rpx;" disabled @tap="show1=true"
			:value="columns[0].find(item=>item.id == type).label" type="text" />
		<u-picker :itemHeight="80" closeOnClickOverlay @close="show1=false" @cancel="show1=false" @confirm="change"
			:show="show1" :columns="columns" keyName="label"></u-picker>
	</view>
</template>

<script>
	export default {
		props: ["type"],
		data() {
			return {
				show1: false,
				usertype: '',
				columns: [
					[{
							label: "普通",
							// 其他属性值
							id: 0,
							// ...
						},
						{
							label: "VIP",
							id: 1,
						},
					],
				],
			};
		},
		methods: {
			change(e) {
				this.usertype = e.value[0].label;
				this.usertype1 = e.value[0].id;
				this.show1 = false;
				this.$emit("confirm", this.usertype1)
			},
		},
	};
</script>
